package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallCustomize;
import com.appkubes.mall.core.po.MallCustomizeExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallCustomizeMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customize
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallCustomizeSqlProvider.class, method="countByExample")
    long countByExample(MallCustomizeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customize
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallCustomizeSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallCustomizeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customize
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_customize",
        "where customize_key = #{customizeKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String customizeKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customize
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_customize (customize_key, app_key, ",
        "store_key, `type`, ",
        "title, pic, clickago_icon, ",
        "clickafter_icon, link_type, ",
        "url_type, url, url_typeid, ",
        "url_name, appid, ",
        "`path`, sort, `state`, ",
        "create_time, version)",
        "values (#{customizeKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{storeKey,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT}, ",
        "#{title,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, #{clickagoIcon,jdbcType=VARCHAR}, ",
        "#{clickafterIcon,jdbcType=VARCHAR}, #{linkType,jdbcType=BIT}, ",
        "#{urlType,jdbcType=TINYINT}, #{url,jdbcType=VARCHAR}, #{urlTypeid,jdbcType=INTEGER}, ",
        "#{urlName,jdbcType=VARCHAR}, #{appid,jdbcType=VARCHAR}, ",
        "#{path,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{state,jdbcType=TINYINT}, ",
        "#{createTime,jdbcType=INTEGER}, #{version,jdbcType=INTEGER})"
    })
    int insert(MallCustomize record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customize
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallCustomizeSqlProvider.class, method="insertSelective")
    int insertSelective(MallCustomize record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customize
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallCustomizeSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="customize_key", property="customizeKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="store_key", property="storeKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="pic", property="pic", jdbcType=JdbcType.VARCHAR),
        @Result(column="clickago_icon", property="clickagoIcon", jdbcType=JdbcType.VARCHAR),
        @Result(column="clickafter_icon", property="clickafterIcon", jdbcType=JdbcType.VARCHAR),
        @Result(column="link_type", property="linkType", jdbcType=JdbcType.BIT),
        @Result(column="url_type", property="urlType", jdbcType=JdbcType.TINYINT),
        @Result(column="url", property="url", jdbcType=JdbcType.VARCHAR),
        @Result(column="url_typeid", property="urlTypeid", jdbcType=JdbcType.INTEGER),
        @Result(column="url_name", property="urlName", jdbcType=JdbcType.VARCHAR),
        @Result(column="appid", property="appid", jdbcType=JdbcType.VARCHAR),
        @Result(column="path", property="path", jdbcType=JdbcType.VARCHAR),
        @Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER),
        @Result(column="state", property="state", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallCustomize> selectByExampleWithRowbounds(MallCustomizeExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customize
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallCustomizeSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="customize_key", property="customizeKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="store_key", property="storeKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="pic", property="pic", jdbcType=JdbcType.VARCHAR),
        @Result(column="clickago_icon", property="clickagoIcon", jdbcType=JdbcType.VARCHAR),
        @Result(column="clickafter_icon", property="clickafterIcon", jdbcType=JdbcType.VARCHAR),
        @Result(column="link_type", property="linkType", jdbcType=JdbcType.BIT),
        @Result(column="url_type", property="urlType", jdbcType=JdbcType.TINYINT),
        @Result(column="url", property="url", jdbcType=JdbcType.VARCHAR),
        @Result(column="url_typeid", property="urlTypeid", jdbcType=JdbcType.INTEGER),
        @Result(column="url_name", property="urlName", jdbcType=JdbcType.VARCHAR),
        @Result(column="appid", property="appid", jdbcType=JdbcType.VARCHAR),
        @Result(column="path", property="path", jdbcType=JdbcType.VARCHAR),
        @Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER),
        @Result(column="state", property="state", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallCustomize> selectByExample(MallCustomizeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customize
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "customize_key, app_key, store_key, `type`, title, pic, clickago_icon, clickafter_icon, ",
        "link_type, url_type, url, url_typeid, url_name, appid, `path`, sort, `state`, ",
        "create_time, version",
        "from mall_customize",
        "where customize_key = #{customizeKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="customize_key", property="customizeKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="store_key", property="storeKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="pic", property="pic", jdbcType=JdbcType.VARCHAR),
        @Result(column="clickago_icon", property="clickagoIcon", jdbcType=JdbcType.VARCHAR),
        @Result(column="clickafter_icon", property="clickafterIcon", jdbcType=JdbcType.VARCHAR),
        @Result(column="link_type", property="linkType", jdbcType=JdbcType.BIT),
        @Result(column="url_type", property="urlType", jdbcType=JdbcType.TINYINT),
        @Result(column="url", property="url", jdbcType=JdbcType.VARCHAR),
        @Result(column="url_typeid", property="urlTypeid", jdbcType=JdbcType.INTEGER),
        @Result(column="url_name", property="urlName", jdbcType=JdbcType.VARCHAR),
        @Result(column="appid", property="appid", jdbcType=JdbcType.VARCHAR),
        @Result(column="path", property="path", jdbcType=JdbcType.VARCHAR),
        @Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER),
        @Result(column="state", property="state", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallCustomize selectByPrimaryKey(String customizeKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customize
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallCustomizeSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallCustomize record, @Param("example") MallCustomizeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customize
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallCustomizeSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallCustomize record, @Param("example") MallCustomizeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customize
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallCustomizeSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallCustomize record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customize
     *
     * @mbg.generated
     */
    @Update({
        "update mall_customize",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "store_key = #{storeKey,jdbcType=VARCHAR},",
          "`type` = #{type,jdbcType=TINYINT},",
          "title = #{title,jdbcType=VARCHAR},",
          "pic = #{pic,jdbcType=VARCHAR},",
          "clickago_icon = #{clickagoIcon,jdbcType=VARCHAR},",
          "clickafter_icon = #{clickafterIcon,jdbcType=VARCHAR},",
          "link_type = #{linkType,jdbcType=BIT},",
          "url_type = #{urlType,jdbcType=TINYINT},",
          "url = #{url,jdbcType=VARCHAR},",
          "url_typeid = #{urlTypeid,jdbcType=INTEGER},",
          "url_name = #{urlName,jdbcType=VARCHAR},",
          "appid = #{appid,jdbcType=VARCHAR},",
          "`path` = #{path,jdbcType=VARCHAR},",
          "sort = #{sort,jdbcType=INTEGER},",
          "`state` = #{state,jdbcType=TINYINT},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "version = #{version,jdbcType=INTEGER}",
        "where customize_key = #{customizeKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallCustomize record);
}